from starlette.endpoints import HTTPEndpoint
from starlette.responses import JSONResponse
from database import Session, engine
import datetime
from dao import DaoEquipmentVenderList



class EquipmentVenderList(HTTPEndpoint):

    async def get(self, request):
        session = Session()
        try:
            classifyid = request.query_params["classifyid"]
            return  DaoEquipmentVenderList.get_vender_info(session, classifyid)
        finally:
            session.close()